package single_game.logic.race_simulator.race_team.my_riders_actions;

import single_game.logic.race_simulator.Group;
import single_game.logic.race_simulator.RaceSimulator;
import single_game.logic.race_simulator.race_team.RaceRider;

public class MyRiderInRelayQueue {
	
	public static void simulateRiderAction(RaceRider rider) {
		Group group = RaceSimulator.findGroupById(rider.getGroupId());
		if (!group.inRelayGroup(rider))
			group.addToRelayGroup(rider);
		
		if (rider.getEnergy() < 2.0)
			rider.setAction("Maintain Position");
	}
}
